package com.jy.adscm.operation.base.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jy.adscm.bean.system.JyDept;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 个人工作计划
 * </p>
 *
 * @author zyl
 * @since 2020-05-26
 */
public class TaskWorkPlan implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 计划名称
     */
    private String name;
    /**
     * 计划开始时间
     */
    private Date planStartTime;
    /**
     * 计划结束时间
     */
    private Date planEndTime;
    /**
     * 1（明细附后）2不清楚 3等待公司上级安排
     */
    private Integer type;
    /**
     * 创建人
     */
    private String creator;
    @TableField(exist = false)
    private String creatorName;
    /*创建时间*/
    private Date createTime;
    /*审核人*/
    private String approver;
    @TableField(exist = false)
    private String approverName;
    /*审核时间*/
    private Date approveTime;
    /**
     * 状态  0 待提交  1 待审核  2 审核通过  3 审核不通过
     */
    private Integer state;
    private Integer   dept;
    @TableField(exist = false)
    private JyDept  jyDept;
     @TableField(exist = false)
     private List<TaskWorkPlanDetail> taskWorkPlanDetails;

     private  String  approveResult;

    public String getApproveResult() {
        return approveResult;
    }

    public void setApproveResult(String approveResult) {
        this.approveResult = approveResult;
    }

    public Integer getDept() {
        return dept;
    }

    public void setDept(Integer dept) {
        this.dept = dept;
    }

    public JyDept getJyDept() {
        return jyDept;
    }

    public void setJyDept(JyDept jyDept) {
        this.jyDept = jyDept;
    }

    public String getApproverName() {
        return approverName;
    }

    public void setApproverName(String approverName) {
        this.approverName = approverName;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public List<TaskWorkPlanDetail> getTaskWorkPlanDetails() {
        return taskWorkPlanDetails;
    }

    public void setTaskWorkPlanDetails(List<TaskWorkPlanDetail> taskWorkPlanDetails) {
        this.taskWorkPlanDetails = taskWorkPlanDetails;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getPlanStartTime() {
        return planStartTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd")
    public void setPlanStartTime(Date planStartTime) {
        this.planStartTime = planStartTime;
    }
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getPlanEndTime() {
        return planEndTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd")
    public void setPlanEndTime(Date planEndTime) {
        this.planEndTime = planEndTime;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getApprover() {
        return approver;
    }

    public void setApprover(String approver) {
        this.approver = approver;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getApproveTime() {
        return approveTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setApproveTime(Date approveTime) {
        this.approveTime = approveTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "TaskWorkPlan{" +
        "id=" + id +
        ", name=" + name +
        ", planStartTime=" + planStartTime +
        ", planEndTime=" + planEndTime +
        ", type=" + type +
        ", creator=" + creator +
        ", createTime=" + createTime +
        ", approver=" + approver +
        ", approveTime=" + approveTime +
        ", state=" + state +
        "}";
    }
}
